package pcb.models 
{
	import com.intel.patterns.observer.Subject;
	import com.intel.utils.TextRender;
	
	/**
	 * PlayerSettings corresponds to the presets defined in config.xml
	 * @author Fintan Boyle
	 */
	public class PlayerSettings extends Subject implements IModel 
	{
		public var autoStartLesson:Boolean = true;
		public var autoSlideTransition:Boolean = false;
		public var hideSlideTransitionControl:Boolean = false;
		public var slideChangeDelay:Number = 2000;
		private var _playAudio:Boolean = false;
		private var _culture:String;
		
		private var _course:String;
		
		//daveh - changed to have multiple audio settings
		public var audioQuality:String = DEFAULT_QUALITY_SOUND;
		
		//public static const HIGH_QUALITY_SOUND:String = "high";
		//public static const LOW_QUALITY_SOUND:String = "low";
		public static const DEFAULT_QUALITY_SOUND:String = "default";
		public static const NO_SOUND:String = "none";
		
		public static const SINGLE_LESSON:String = "single";
		public static const MULTI_LESSON:String = "multi";
		
		public var deployment:String = "web";
		public var fullscreenMode:Boolean = false;
		public var scaleToFit:Boolean = false;
		
		public var useMainMenu:Boolean = true;
		public var playerType:String = SINGLE_LESSON;
		
		public var useScorm:Boolean = false;
		public var scormLessonId:String;
		
		public function PlayerSettings() 
		{
			
		}
		
		public function get playAudio():Boolean { return _playAudio; }
		
		public function set playAudio(value:Boolean):void 
		{
			_playAudio = value;
			notify(Notifications.PLAY_AUDIO_SET);
		}
		
		public function get culture():String { return _culture; }
				
		public function set culture(value:String):void 
		{
			if (!TextRender.blnWasInitalised) TextRender.initialise(value);
			_culture = value;
		}
		
		public function get course():String { return _course; }
				
		public function set course(value:String):void 
		{			
			_course = value;
		}
		
		
		/**
		 * a generic notification called when all settings are initially configured
		 */
		public function setFromConfig():void 
		{
			notify(Notifications.SET_FROM_CONFIG);
		}
		
		
	}
	
}